#!/bin/bash

TMP_CP=tmp-classpath.txt
mvn dependency:build-classpath -Dmdep.outputFile=$TMP_CP

CLASSPATH=`cat $TMP_CP`
export CLASSPATH=${CLASSPATH}:target/classes/

rm $TMP_CP

echo "Using classpath: $CLASSPATH"

#export JAVA_OPTS="$JAVA_OPTS -Dtc.classloader.writeToDisk=true"
echo ""
echo ""
java $JAVA_OPTS -Dcom.sun.management.jmxremote -Xms128m -Xmx128m -cp $CLASSPATH demo.cyclicbarrier.CyclicBarrierDemo $@

